{% extends 'base_course.html' %}

{% block gcb_page_info %}
  if ('gcbSetPageInfo' in window) {
    gcbSetPageInfo({
      'page_type': 'course',
    });
  }
{% endblock %}

{% block top_content %}
  <script>
    {# I18N: This is shown to the student in a popup after registration. #}
    var regConfirmationMsg = "{{ gettext('Thank you for registering for the course. Click the Announcements tab for important information.') }}";
    if(window.location.hash == '#registration_confirmation') {
      cbShowMsgAutoHide(regConfirmationMsg);
    }
    {# I18N: This is shown to the student in a popup if registrations for the course are not open. #}
    var regClosedMsg = "{{ gettext('Registrations for this course are not open.') }}";
    if(window.location.hash == '#registration_closed') {
      cbShowMsgAutoHide(regClosedMsg);
    }
  </script>
  <div class="gcb-cols">
    <div class="gcb-col-11 gcb-aside">
      {% include 'summary.html' %}

      {% if transient_student %}
        {% include 'registration_module.html' %}
      {% endif %}
    </div>
</div>
{% endblock %}

{% block main_content %}
  {% import 'macros.html' as macros %}
    <div style="margin-top: 20px;" class="gcb-cols">
      <div class="gcb-col-1">
      </div>
      <div class="gcb-col-9">

        <h1 class="gcb-schedule-headers">
          {# I18N: This should be interpreted as a noun. It is the title for the course schedule on the main contents page. #}
          {{ gettext('Schedule') }}
        </h1>
        <div id="gcb-main" role="main">
          <div class="gcb-nav gcb-nav-full" id="gcb-nav-y">
            <ul>
              {% for unit in units %}
                {{ macros.render_unit_title(
                    unit, progress, is_progress_recorded,
                    transient_student, can_see_drafts, True,
                    css_class=None,
                    target_url='assessment?name=%s' % unit.unit_id,
                    include_description=True,
                    student_preferences=student_preferences) }}
              {% endfor %}
            </ul>
          </div>
        </div>

      </div>
    </div>
{% endblock %}
